/*
 * ICategoryModel.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.model;

import com.yidiandao.business.data.bean.Goods;
import com.yidiandao.business.data.recyclertype.DoubleGoods;
import com.yidiandao.business.data.response.CategoryResponse;

import java.util.List;

/** 分类Model */
public interface ICategoryModel {

    /**
     * 加载当前品牌下的最新商品
     *
     * @param categoryId 品牌的Id
     * @param keyword 搜索的关键词
     */
    void loadCategoryNewGoodsList(
            boolean isRefreshing,
            String categoryId,
            String keyword,
            String tag,
            OnLoadCategoryGoodsListener listener);

    void loadCategoryPriceGoodsList(
            boolean isRefreshing,
            String categoryId,
            String keyword,
            boolean isSortUp,
            String tag,
            OnLoadCategoryGoodsListener listener);

    void loadCategorySalesGoodsList(
            boolean isRefreshing,
            String categoryId,
            String keyword,
            String tag,
            OnLoadCategoryGoodsListener listener);

    interface OnLoadCategoryListener {

        void onFailed();

        void onFinal();

        void onSuccess(List<CategoryResponse.DataBean> data);
    }

    interface OnLoadCategoryGoodsListener {

        void onSuccess(
                List<Goods> goodses,
                List<DoubleGoods> goodsList,
                boolean emptyResult,
                boolean hasMoreData);

        void onFailed();

        void onFinal();
    }
}
